SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.framework.card
Class Card.IO

java.lang.Object
  extended byjp.co.ricoh.dsdk.scard.framework.card.Card.IO
Enclosing class:
Card

public class Card.IO
extends java.lang.Object

This is the class that encapsulates input and output operation of a card.


Method Summary
 byte[] control(int code, byte[] buffer)
           Transmits a control command.
 byte[] control(int code, byte[] buffer, int index, int length)
           Transmits a control command.
 byte[] getAttribute(int id)
           Obtains the attribute.
 APDU transmit(APDU apdu)
           Transmits an APDU command to a card.
 byte[] transmit(byte[] buffer)
           Transmits the content of a specified buffer to a card.
 byte[] transmit(byte[] buffer, int index, int length)
           Transmits the content of a specified buffer to a card.
 ResponseAPDU transmit(RequestAPDU command)
          Transmits a command apdu to a card .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transmit

public APDU transmit(APDU apdu)
              throws CardAccessException
Transmits an APDU command to a card.

Parameters:
apdu - an APDU command to transmit.
Returns:
the response APDU.
Throws:
CardAccessException - when an error has occurred in communicating with the card.

transmit

public ResponseAPDU transmit(RequestAPDU command)
                      throws CardAccessException,
                             APDUException
Transmits a command apdu to a card .

Parameters:
command - command apud .
Returns:
the response APDU.
Throws:
CardAccessException - when an error has occurred in communicating with the card .
APDUException - when APDU is initialized incorrectly .

transmit

public byte[] transmit(byte[] buffer)
                throws CardAccessException
Transmits the content of a specified buffer to a card.

Parameters:
buffer - the buffer containing the content to transmit.
Returns:
the response buffer.
Throws:
CardAccessException - when an error has occurred in communicating with the card.

transmit

public byte[] transmit(byte[] buffer,
                       int index,
                       int length)
                throws CardAccessException
Transmits the content of a specified buffer to a card.

Parameters:
buffer - the buffer containing the content to transmit.
index - the start position of the content to transmit.
length - the length of the content to transmit.
Returns:
the response buffer sent from the card.
Throws:
CardAccessException - when an error has occurred in communicating with the card.

control

public byte[] control(int code,
                      byte[] buffer)
               throws CardAccessException
Transmits a control command.

Parameters:
code - a control code.
buffer - the buffer containing the command .
Returns:
a response buffer.
Throws:
CardAccessException - when an error has occurred in communicating with the card.

control

public byte[] control(int code,
                      byte[] buffer,
                      int index,
                      int length)
               throws CardAccessException
Transmits a control command.

Parameters:
code - a control code.
buffer - the buffer containing the command .
index - the start position of the command.
length - the length of the command.
Returns:
a response buffer..
Throws:
CardAccessException - when an error has occurred in communicating with the card.

getAttribute

public byte[] getAttribute(int id)
                    throws CardAccessException
Obtains the attribute.

Parameters:
id - an attribute ID.
Returns:
the attribute buffer.
Throws:
CardAccessException - when an error has occurred in communicating with the card.

SDK/J Authentication Package ver1.0
RICOH Confidential